local NpcTrigger = class("NpcTrigger")
local GameConst = require("const.GameConst")

function NpcTrigger:ctor()
end

function NpcTrigger:onTriggerEnter(other)
    if other:CompareTag("Player") then
        G_SignalManager:dispatch(SignalConst.EVENT_NPC_TRIGGER_ADD, self._npcId, GameConst.NPC_TRIGGER)
    end
end

function NpcTrigger:onTriggerExit(other)
    if other:CompareTag("Player") then
        G_SignalManager:dispatch(SignalConst.EVENT_NPC_TRIGGER_REMOVE, self._npcId, GameConst.NPC_TRIGGER)
    end
end

return NpcTrigger
